package snmpstatistics;

import java.util.Hashtable;

public class StatsToShow {
	
	private Hashtable<Statistics, Boolean> enabledStatistics;
	
	public StatsToShow(){
		enabledStatistics = new Hashtable<Statistics, Boolean>();
		enabledStatistics.put(Statistics.BAD_VALUES, true);
		enabledStatistics.put(Statistics.GEN_ERR, true);
		enabledStatistics.put(Statistics.GET_NEXT, true);
		enabledStatistics.put(Statistics.GET_REQUEST, true);
		enabledStatistics.put(Statistics.GET_RESPONSE, true);
		enabledStatistics.put(Statistics.NO_SUCH_NAME, true);
		enabledStatistics.put(Statistics.PACKETS, true);
		enabledStatistics.put(Statistics.SET_REQUEST, true);
		enabledStatistics.put(Statistics.TOO_BIG, true);
		enabledStatistics.put(Statistics.TRAPS, true);
		enabledStatistics.put(Statistics.IN_PDU_ERROR_RATE, true);
		enabledStatistics.put(Statistics.OUT_PDU_ERROR_RATE, true);
		enabledStatistics.put(Statistics.TOTAL_IN_PACKETS, true);
		enabledStatistics.put(Statistics.TOTAL_OUT_PACKETS, true);
	}
	
	public void enable(Statistics statistics, boolean enable){
		
		enabledStatistics.put(statistics, enable);
	}
	
	public boolean isEnabled(Statistics statistics){
		return enabledStatistics.get(statistics);
	}
	
	public enum Statistics {
		PACKETS, 
		BAD_VALUES, 
		GEN_ERR, 
		GET_NEXT, 
		GET_REQUEST, 
		GET_RESPONSE, 
		SET_REQUEST, 
		NO_SUCH_NAME, 
		TOO_BIG,
		TRAPS, 
		IN_PDU_ERROR_RATE, 
		OUT_PDU_ERROR_RATE,
		TOTAL_IN_PACKETS,
		TOTAL_OUT_PACKETS;
	}
}
